/* 全局样式 */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #ffffff;
  color: #333333;
  line-height: 1.6;
}

/* 演示页面通用样式 */
.demo-section {
  margin-bottom: 3rem;
  padding: 2rem;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  background-color: #ffffff;
}

.demo-section h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: #495057;
  font-size: 1.5rem;
  font-weight: 600;
  border-bottom: 2px solid #007bff;
  padding-bottom: 0.5rem;
}

.demo-content {
  display: grid;
  gap: 2rem;
}

.demo-preview {
  padding: 1.5rem;
  background-color: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #dee2e6;
}

.demo-code {
  background-color: #f1f3f4;
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
}

.demo-code pre {
  margin: 0;
  font-family: 'Courier New', Monaco, monospace;
  font-size: 0.875rem;
  line-height: 1.4;
}

.demo-input {
  margin-bottom: 1rem;
}

.demo-input label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #495057;
}

.demo-input input {
  width: 100%;
  max-width: 300px;
  padding: 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 1rem;
}

.demo-input input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.demo-input p {
  margin-top: 0.5rem;
  margin-bottom: 0;
  font-size: 0.875rem;
}

.valid {
  color: #28a745;
}

.invalid {
  color: #dc3545;
}

/* 按钮间距 */
.demo-preview .vt-button + .vt-button {
  margin-left: 1rem;
}

/* 响应式 */
@media (min-width: 768px) {
  .demo-content {
    grid-template-columns: 1fr 1fr;
  }
}